package com.xcc.common;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xcc.common.model.CommonTable;
import com.xcc.common.service.CommonService;


@RestController("commController")
@CrossOrigin
public class CommonController {

	@Autowired
	CommonService mCommonService;
	
	//先以10分页模式
	@RequestMapping(value="/common/{tableId}")
	public Object getCommonObject(@PathVariable("tableId")String tableId,@RequestBody CommonTable mCommonTable) {
		return	mCommonService.getCommonObject(tableId,mCommonTable);
	}
	
	@RequestMapping(value="/commonquery/{tableId}")
	public Object commonquery(@PathVariable("tableId")String tableId,@RequestBody  CommonTable  mCondition) {
		return	mCommonService.commonquery(tableId,mCondition);
	}
	
	
	
	@RequestMapping(value="/commonsave/{tableId}")
	public void commonSave(@PathVariable("tableId")String tableId,@RequestBody  CommonTable  mCondition) {
		 	mCommonService.commonSave(tableId,mCondition);
	}
	
	
	
	@RequestMapping(value="/commondelete/{tableId}")
	public void commondelete(@PathVariable("tableId")String tableId,@RequestBody  CommonTable  mCondition) {
		 	mCommonService.commondelete(tableId,mCondition);
	}
	
	
	
	
}
